﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using Microsoft.SharePoint;

using Actuant.Utility;

namespace Actuant.MOSS.Feature
{
    /// <summary>
    /// The lookup feature receiver.
    /// </summary>    
    public class LookupFeatureReceiver : SPFeatureReceiver
    {
        #region Overrides of SPFeatureReceiver

        public override void FeatureActivated(SPFeatureReceiverProperties properties)
        {
            var web = properties.Feature.Parent as SPWeb;

            SPLookupHelper.CreateLookupContentTypeField(
                "Driver", 
                "DriverId", 
                "Actuant ContentTypes", 
                true, 
                false, 
                web.Site.RootWeb, 
                web, 
                "DriverList", 
                "DriverId", 
                "PickCarList");

        }

        public override void FeatureDeactivating(SPFeatureReceiverProperties properties)
        {            
        }

        public override void FeatureInstalled(SPFeatureReceiverProperties properties)
        {
        }

        public override void FeatureUninstalling(SPFeatureReceiverProperties properties)
        {
        }

        #endregion
    }
}
